home *** CD-ROM | disk | FTP | other *** search
/ Colorado Rockies 2000 / Colorado Rockies 2000 by US West.iso / mac / xtras / Beatnik Xtra Lite / Beatnik Behaviors LiteD7.cst / 00006_Script_SoloTrack Lite Behavior < prev    next >
Text File  |  1998-10-22  |  5KB  |  130 lines

  1. -- SoloTrack Lite, a Beatnik Behavior
  2. -- by Paul Sebastien, pauls@sirius.com, http://www.bitstream.net/psykosonik
  3.  
  4. -- The 'Pro' version of this behavior will feature automatic Beatnik instance selection for targetting specific instances, and more. For more info, go to http://www.headspace.com/
  5.  
  6.  
  7. global beatnik
  8.  
  9.  
  10.  
  11.  
  12.  
  13. property pWhichEvent
  14. property pWhichTrack
  15. property pSoloState
  16.  
  17.  
  18. on getPropertyDescriptionList
  19.   
  20.   --  initialize the Beatnik Xtra instance
  21.   
  22.   --  instantiation script (below) is commented out, as it is not necessary to instantiate a new instance, since we are just soloing a track on an existing one named 'beatnik'. Please make sure that the instance that you want to perform the soloing of tracks on is named 'beatnik', otherwise you should change the instance name in this script to match the instance name that you want to solo tracks on.
  23.   
  24.   
  25.   
  26.   --  put "------------------------------"
  27.   --  if ilk(beatnik) = #instance then stop(beatnik)
  28.   --  set beatnik = VOID
  29.   --  set beatnik = new(xtra "beatnik",TRUE)
  30.   --  set bankFileName = the moviePath & "patches.hsb"
  31.   --  put "beatnik =" && beatnik
  32.   --  put "Bank =" && bankFileName
  33.   --  put "SetSampleLibrary(beatnik) = " & setsampleLibrary(beatnik, bankFileName)
  34.   --  put "SetReady(beatnik) = " & setReady(beatnik)
  35.   --  put "isReady(beatnik) = " & isReady(beatnik)
  36.   --  if not(isReady(beatnik)) then
  37.   --    alert "The Beatnik Xtra did not initialize, the Beatnik soundbank file 'patches.hsb' must be in the same folder as your current Director movie is in (or modify the path in the script). Also, make sure that the Xtra (BEATNIK.X32) is added to this movie."
  38.   --    exit
  39.   --  end if
  40.   --  --  finished initializing the Beatnik Xtra instance
  41.   
  42.   
  43.   
  44.   
  45.   
  46.   
  47.   
  48.   
  49.   
  50.   set d = [:]
  51.   
  52.   
  53.   addProp d, #pWhichEvent, [#default: "mouseDown", #format: #symbol, #range: [#mouseDown, #mouseUp, #mouseEnter, #mouseLeave, #mouseWithin,#enterFrame,#exitFrame], #comment: "Choose a trigger event:"]
  54.   addProp d, #pWhichTrack, [#default: "", #format: #integer, #comment: "Enter the number of the track to Solo/un-Solo:"]
  55.   addProp d, #pSoloState, [#default: "1", #format: #integer, #comment: "Enter '1' to Solo, or '0' to un-solo this track:"]
  56.   
  57.   return d
  58. end
  59.  
  60.  
  61.  
  62. on doIt me
  63.   global beatnik
  64.   setTrackSolo(beatnik, pWhichTrack, pSoloState)
  65.   
  66.   
  67. end
  68.  
  69.  
  70.  
  71. on mouseDown me
  72.   if the pWhichEvent of me = #mouseDown then doIt me
  73.   
  74. end
  75.  
  76.  
  77. on mouseUp me
  78.   if the pWhichEvent of me = #mouseUp then doIt me
  79.   
  80.   
  81.   
  82. end
  83.  
  84.  
  85. on mouseEnter me
  86.   if the pWhichEvent of me = #mouseEnter then doIt me
  87.   
  88. end
  89.  
  90.  
  91. on mouseLeave me
  92.   if the pWhichEvent of me = #mouseLeave then doIt me
  93.   
  94. end
  95.  
  96. on mouseWithin me
  97.   if the pWhichEvent of me = #mouseWithin then doIt me
  98.   
  99. end
  100.  
  101.  
  102. on enterFrame me
  103.   if the pWhichEvent of me = #enterFrame then doIt me
  104.   
  105. end
  106.  
  107. on exitFrame me
  108.   if the pWhichEvent of me = #exitFrame then doIt me
  109.   
  110. end
  111.  
  112.  
  113. on stopMovie
  114.   global beatnik
  115.    stop(beatnik)
  116.   closeBeatnik(beatnik)
  117.   set beatnik=VOID
  118.  
  119. end stopMovie
  120.  
  121.  
  122.  
  123. on getBehaviorDescription
  124.   
  125.   
  126.   set description = "SOLO TRACK LITE BEHAVIOR" && RETURN & "by Paul Sebastien pauls@sirius.com" && RETURN && RETURN & "This Beatnik Behavior allows you to solo or un-solo any track of an RMF file MIDI file playing through a Beatnik Xtra instance named 'beatnik'. You can edit this behavior's script to choose a different instance name if necessary." && RETURN && RETURN & "PARAMETERS:" && RETURN && RETURN & "ò Enter the number of the track to Solo/un-Solo:" && RETURN & "...Lets you specify which track in the RMF or MIDI file to solo or un-solo." && RETURN && RETURN & "ò Choose a trigger event:" && RETURN & "...Lets you choose which Director event you want to trigger the solo/un-solo function." && RETURN && RETURN & "IMPORTANT:" && RETURN &&RETURN & "- This behavior requires that the Beatnik Xtra Lite is properly added to your Director project, and also, the Beatnik soundbank (patches.hsb) must be in the same directory as your Director project file, otherwise you should change the path to the soundbank in this behavior's script if the soundbank resides elsewhere." && RETURN && RETURN & "- If you want to use this behavior to solo tracks on multiple files/instances simultaneously, you should modify the Beatnik instance name used in this behavior's script so it is unique for each instance. Currently, the instance name used is 'beatnik', so if you want to solo tracks on multiple instances or instances named something other than 'beatnik', you can modify the name in the script to 'beatnik2' and so on, as needed, to create multiple separate instances." && RETURN &&RETURN & "For more information on instantiating the Beatnik Xtra Lite, refer to the documentation or other Beatnik Xtra sample movies." && RETURN && RETURN & "To upgrade to Beatnik Behaviors Pro, or for more information on Beatnik-related products and music files, visit the Headspace web site at:" && RETURN && RETURN & "http://www.headspace.com"
  127.   
  128.   return description
  129. end
  130.